<?php
/**
 * @file name : plang_model.php
 * @package   :
 * @author    : Vo Thanh Minh
 * @email     : <thanhminhld@yahoo.com - thanhminhld@gmail.com>
 * @copyright : 2011
 *
 */
if (!defined('BASEPATH')) {
    exit('No direct script access');
}

class Plang_model extends Base_Model
{
    /**
     * @function __construct
     * @author   Vo Thanh Minh <thanhminhld@yahoo.com - thanhminhld@gmail.com>
     */
	public function __construct()
	{
		parent::__construct();
		$this->_tbl       = 'plang';
	}
	/**
	 * getTotalRows
	 *
	 * @author Vo Thanh Minh <thanhminhld@yahoo.com - thanhminhld@gmail.com>
	 * @access public
	 * @param array $arrWhere
	 *
	 * @return int
	 */
    public function getTotalRows($arrWhere = array())
    {
	    if (count($arrWhere) > 0) {
            $this->db->where($arrWhere);
        }
		$query = $this->db->get_where($this->_tbl, $arrWhere);

		return $query->num_rows();
    }
}